#include"StdAfx.h"

std::list<IObject*> *IObject::m_pInstances = new NEW_MEM_LEAK std::list<IObject*>();

IObject::IObject()
{
	m_nReferenceCount = 0;
	++m_nReferenceCount;
	m_pInstances->push_back(this);
}

IObject::~IObject()
{
	--m_nReferenceCount;
	m_pInstances->remove(this);
	//delete (m_pInstances);
	//m_pInstances = NULL;
}

